package org.cmind.soap.android;

import java.util.ArrayList;
import java.util.List;

/**
 * Soap object containg other soap objects.
 * 
 * @author marcin
 * 
 */
public class ComplexSoapObject extends BasicSoapObject {

    private List<SoapObject> childs = new ArrayList<SoapObject>();

    public ComplexSoapObject(String name, String namespace) {
        super(name, namespace);
    }

    public void addSoapObject(SoapObject child) {
        if (child != null && child.getNamespace() == null) {
            child.setNamespace(namespace);
        }
        childs.add(child);
    }

    public List<SoapObject> getChilds() {
        return childs;
    }

    @Override
    public String getValue() {
        return null;
    }

}
